Ext.ns("Ext.ux.menu");

Ext.ux.menu.DateTimeItem = function(config){
    Ext.ux.menu.DateTimeItem.superclass.constructor.call(this, new Ext.DateTimePicker(config), config);
    this.picker = this.component;
    // console.log(this); 
    this.addEvents('select');

    this.picker.on("render", function(picker){
        picker.getEl().swallowEvent("click");
        picker.container.addClass("x-menu-date-item");
    });
    
    this.picker.on("select", this.onSelect, this);
};

Ext.extend(Ext.ux.menu.DateTimeItem, Ext.menu.DateMenu, {
    onSelect: function(picker, date){
        this.fireEvent("select", this, date, picker);
        Ext.ux.menu.DateTimeItem.superclass.handleClick.call(this);
    }
});